local function GetStringsTable()
    return TUNING.NPC_CHAT_TABLE[ type(TUNING.__NPC_LANGUAGE)=="function" and TUNING.__NPC_LANGUAGE() or TUNING.__NPC_LANGUAGE ] ["npc_item_cards_station"] or {}
end
local function start_event(player)
    local pt = player.npc_base_lib:GetSpawnPoint(player, 3) or Vector3(player.Transform:GetWorldPosition())
    local npc = SpawnPrefab("shadowprotector")
    npc:Hide()
    npc.Transform:SetPosition(pt.x, 0, pt.z)
    npc:PushEvent("upgrade.npc","coin")
    npc:Show()

    if player.npc_everything_data:Add("npc_card_bottle_with_coin.data",1) %4 == 0 then
        player:DoTaskInTime(5,function()
            player.npc_base_lib:Wisper(GetStringsTable()["npc_card_bottle_with_coin"])            
        end)
    end
end
local function fx()
    local inst = CreateEntity()
    inst.entity:AddTransform()

    inst:AddTag("INLIMBO")
    inst:AddTag("FX")

    if not TheWorld.ismastersim then
        return inst
    end

    inst:ListenForEvent("Set",function(inst,player)
        start_event(player)
        inst:Remove()
    end)

    return inst
end

return Prefab("npc_card_bottle_with_coin",fx)